package com.a01_2021.thousandstimes.saas.service;

import com.a01_2021.thousandstimes.exception.CustomException;
import com.a01_2021.thousandstimes.saas.entity.SysInstance;
import com.baomidou.mybatisplus.extension.service.IService;

import java.sql.SQLException;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author FRQ
 * @since 2021-02-22
 */
public interface SysInstanceService extends IService<SysInstance> {

    boolean isInstance(String instanceName);

    Map<String, String> addInstance(String instanceName, long parseLong) throws SQLException, ClassNotFoundException;

    SysInstance renewalInstance(String renewalInstanceId, int renewalDay) throws CustomException;

    boolean isInstance(long instanceId);

    SysInstance getInstanceInfo(long instanceId) throws CustomException;

    long getInstanceIdFromUserId(Long userId) throws CustomException;
}
